Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform templateUrl, styleUrls and styles everywhere #211

Merged
merged 4 commits into from
Dec 6, 2018
Merged

Transform templateUrl, styleUrls and styles everywhere #211

merged 4 commits into from
Dec 6, 2018

Conversation

wtho
Copy link
Collaborator

@wtho wtho commented Dec 6, 2018

Closes #210

  • Transformer became more simple
  • Test was added to verify templateUrl gets transformed e. g. in *.spec.ts outside a decorator
  • Updated the Preprocessor-section in README.md

❗ Note that it seems the transformer was modified a lot, but basically I just removed code that only looked deep inside decorators. Now it checks everywhere for stlyes, styleUrls and templateUrl.

wtho added 2 commits December 6, 2018 14:34
templateUrl can also occur e. g. in tests, outside of decorators. These
should also be transformed.
@wtho
Copy link
Collaborator Author

wtho commented Dec 6, 2018

Note that I added @types/node as dev dependency as it was required to compile the transformer via tsc.

@wtho wtho changed the title Transform templateurl everywhere Transform templateUrl, styleUrls and styles everywhere Dec 6, 2018
Copy link
Collaborator Author

@wtho wtho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionality is done - comments have to be updated

src/InlineHtmlStripStylesTransformer.ts Outdated Show resolved Hide resolved
src/InlineHtmlStripStylesTransformer.ts Outdated Show resolved Hide resolved
src/InlineHtmlStripStylesTransformer.ts Outdated Show resolved Hide resolved
src/InlineHtmlStripStylesTransformer.ts Show resolved Hide resolved
@thymikee thymikee requested a review from ahnpnl December 6, 2018 21:52
@ahnpnl
Copy link
Collaborator

ahnpnl commented Dec 6, 2018

Lgtm 👍

@thymikee thymikee merged commit dcc0932 into thymikee:master Dec 6, 2018
thymikee pushed a commit that referenced this pull request Dec 6, 2018
* Fix transformer to handle templateUrl everywhere

templateUrl can also occur e. g. in tests, outside of decorators. These
should also be transformed.

* Update readme - preprocessor => transformer

* Make comments match new implementation

* Update comments and docs
@ahnpnl ahnpnl added this to the 7.0.0 milestone Dec 13, 2018
thymikee added a commit that referenced this pull request Jan 26, 2019
* origin/release/7:
  v7.0.0-alpha.2
  feat: adjust semver range of jest-zone-patch (#209)
  Adjust CHANGELOG (#208)
  Transform templateUrl, styleUrls and styles everywhere (#211)
  v7.0.0-alpha.1
  v7.0.0-alpha.0
thymikee added a commit that referenced this pull request Jan 26, 2019
* origin/master:
  Upgraded ts-jest version. (#219)
  docs: add astTransformers in configuration example (#218)
  feat: Import jest-zone-patch (#214)
  chore: Migrate CI config to CircleCI v2 (#212)
  Transform templateUrl, styleUrls and styles everywhere (#211)
  feat: adjust semver range of jest-zone-patch (#209)
  Adjust CHANGELOG (#208)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants